package com.kotasoft.training.roogwteclipselink.shared.domain;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.OneToMany;
import javax.validation.constraints.NotNull;

import org.springframework.roo.addon.entity.RooEntity;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooEntity
public class Departamento {

    @NotNull
    @Column(unique = true)
    private String nombre;

    @NotNull
    private String facultad;

    @OneToMany(mappedBy = "departamento")
    private Set<Profesor> profesores = new HashSet<Profesor>();
}
